package com.nf.practice.downloadFile;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class PicExportDetail2 {

    private String appNo;

//    // 身份证数量
//    private String idNoNum;
//    // 借款合同数量
//    private String loanContractNum;
//    // 担保合同数量
//    private String guaranteeContractNum;

    private int idNoNum;
    private int loanContractNum;
    private int guaranteeContractNum;

    // 构造函数、getter和setter省略

    public PicExportDetail2() {
    }

    public PicExportDetail2(String appNo, int idNoNum, int loanContractNum, int guaranteeContractNum) {
        this.appNo = appNo;
        this.idNoNum = idNoNum;
        this.loanContractNum = loanContractNum;
        this.guaranteeContractNum = guaranteeContractNum;
    }

    // 可以添加一个方法用于创建一个新的Data实例，它会合并两个Data对象的数值
    public PicExportDetail2 merge(PicExportDetail2 other) {
        return new PicExportDetail2(
                this.appNo,
                this.idNoNum + other.getIdNoNum(),
                this.loanContractNum + other.getLoanContractNum(),
                this.guaranteeContractNum + other.getGuaranteeContractNum()
        );
    }

}
